package com.wst.system.config.job.model;

import com.wst.system.config.job.Job;
import com.wst.system.server.entity.vo.MessageVo;
import com.wst.system.server.service.SseEmitterService;
import org.springframework.beans.factory.annotation.Autowired;

import java.text.SimpleDateFormat;
import java.util.Date;

@Job(name = "发送通知")
public class SendSseMsgJob {

    @Autowired
    private SseEmitterService service;

    public void execute() {
        String msg="系统消息::"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        service.sendMessageToAllClient(msg);
    }


}
